package com.sky.service.impl;

import com.sky.domain.User;
import com.sky.mapper.UserMapper;
import com.sky.service.UserService;
import lombok.experimental.Delegate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> userList(String content) {
        return userMapper.userList(content);
    }

    @Override
    public User login(String loginname, String password) {
        return userMapper.login(loginname,password);
    }

    @Override
    public void update(User user) {
        userMapper.update(user);
    }

    @Override
    public User findUserById(Integer id) {
        return userMapper.findUserById(id);
    }

    @Override
    public void insert(User user) {
        userMapper.insert(user);
    }

    @Override
    public void deleteById(Integer id) {
        userMapper.deleteById(id);
    }
}
